﻿using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.IO;
using LibHuman;
using Human.ListBar;

namespace Human
{
	/// <summary>
	/// Summary description for Form1.
	/// </summary>
	public class frmMain : System.Windows.Forms.Form
	{
        private ToolTip m_toolTip = null;
		public string ten="",mk="",cd="";
		private AccessData mDB=new AccessData();
		private DataSet ds =new DataSet();
		private System.Windows.Forms.MainMenu mnuMain;		
		public System.Windows.Forms.MenuItem mnuNhanSu;
		public System.Windows.Forms.MenuItem mnuTienIch;
		public System.Windows.Forms.MenuItem mnuTruyVan;
		private System.Windows.Forms.MenuItem mnuDoTuoiTB;
		public System.Windows.Forms.MenuItem menuItem1;
		public System.Windows.Forms.MenuItem menuItem2;
		private System.Windows.Forms.MenuItem menuItem12;
		private System.Windows.Forms.MenuItem menuItem181;
		private System.Windows.Forms.MenuItem menuItem24;
		private System.Windows.Forms.MenuItem menuItem33;
        private System.Windows.Forms.MenuItem menuItem36;
		private System.Windows.Forms.MenuItem mnuMucLuongBQ;
		private System.Windows.Forms.MenuItem mnuTinhHinhCV;
		private System.Windows.Forms.MenuItem mnuNgheNghiepDT;
		private System.Windows.Forms.MenuItem mnuGiaCanh;
        private System.Windows.Forms.MenuItem mnuDiNuocNgoai;
		private System.Windows.Forms.MenuItem mnuLylichQTDT;
		private System.Windows.Forms.MenuItem mnuDanhSachCNV;
		private System.Windows.Forms.MenuItem mnuDanhSachConCBCNV;
		private System.Windows.Forms.MenuItem mnuQuaTrinhCT;
		private System.Windows.Forms.MenuItem mnuDanhSachNghiViec;
		private System.Windows.Forms.MenuItem mnuTKNhanSu;
		private System.Windows.Forms.MenuItem mnuDangKySDLD;
		private System.Windows.Forms.MenuItem mnuDSDeNghiKyHDLD;
		private System.Windows.Forms.MenuItem mnuDSCapSoBHXH;
		private System.Windows.Forms.MenuItem mnuDSDeNghiNangLuong;
		private System.Windows.Forms.MenuItem mnuTKLaoDongTienLuong;
		private System.Windows.Forms.MenuItem mnuBCChatLuongBoPhan;
		private System.Windows.Forms.MenuItem mnuBCChatLuongTrucThuoc;
		private System.Windows.Forms.MenuItem mnuBCSLCongChucGiuCacChucVuDoBoNhiem;
		private System.Windows.Forms.MenuItem mnuBCDSTienLuongVaChatLuongChatLuong;
		private System.Windows.Forms.MenuItem mnuBCTongHopNgachBac;
		private System.Windows.Forms.MenuItem mnuBCBienDongDSTienLuong;
		private System.Windows.Forms.MenuItem mnuBCTangGiamBienChe;
		private System.Windows.Forms.MenuItem mnuBCDSVaTienLuongCanBo;
		private System.Windows.Forms.MenuItem mnuBCTucLuc;
		private System.Windows.Forms.MenuItem mnuDSVaKetQuaNamgLuong;
		private System.Windows.Forms.MenuItem mnuDSDangVienChiBo;
		private System.Windows.Forms.MenuItem mnuBKDSCongChucVaLuong;
        private System.Windows.Forms.MenuItem mnuDSLDVaQuyLuongNopBH;
		private System.Windows.Forms.MenuItem mnuMaNgachCC;
		private System.Windows.Forms.MenuItem mnuQuanLyMK;
		private System.Windows.Forms.MenuItem mnuSuaChuaSoLieu;
		private System.Windows.Forms.MenuItem mnuThongKeTTGiaDinh;
		private System.Windows.Forms.MenuItem mnuThoat;
		private string ten1="",ma="",s_maquyen,sten1;
        private System.Windows.Forms.MenuItem menuItem3;
		private System.Windows.Forms.MenuItem menuItem22;
		private System.Windows.Forms.MenuItem menuItem23;
		private System.Windows.Forms.MenuItem menuItem25;
		private System.Windows.Forms.MenuItem menuItem26;
		private System.Windows.Forms.MenuItem menuItem27;
		private System.Windows.Forms.MenuItem menuItem28;
		private System.Windows.Forms.MenuItem menuItem29;
		private System.Windows.Forms.MenuItem menuItem30;
		private System.Windows.Forms.MenuItem menuItem31;
		private System.Windows.Forms.MenuItem menuItem32;
		private System.Windows.Forms.MenuItem menuItem34;
        private System.Windows.Forms.MenuItem menuItem35;
        private System.Windows.Forms.MenuItem menuItem5;
		private System.Windows.Forms.MenuItem menuItem16;
		private System.Windows.Forms.Label lbl1024;
		private System.Windows.Forms.Label lbl800;
		private System.Windows.Forms.MenuItem menuItem20;
		private System.Windows.Forms.MenuItem menuItem21;
		private System.Windows.Forms.MenuItem menuItem40;
		private System.Windows.Forms.MenuItem menuItem41;
		private System.Windows.Forms.MenuItem menuItem42;
        private System.Windows.Forms.MenuItem menuItem43;
        private MenuItem menuItem47;
        private MenuItem menuItem48;
        private MenuItem menuItem46;
        private MenuItem mnuInLyLich;
        private MenuItem mnuLyLichTrichNgang;
        private MenuItem menuItem4;
        private MenuItem menuItem_tinh;
        private MenuItem menuItem_quan;
        private MenuItem menuItem_xa;
        private MenuItem menuItem7;
        private MenuItem menuItem6;
        private MenuItem menuItem8;
        private MenuItem menuItem_cc;
        private MenuItem menuItem9;
        private ButtonListBar ListBar;
        private ImageList ilsIcons32;
        private MenuItem menuItem11;
        private MenuItem menuItem10;
        private MenuItem menuItem13;
        private MenuItem menuItem14;
        private MenuItem menuItem15;
        private MenuItem menuItem17;
        private IContainer components;

		public frmMain()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();
			
			
            lbl1024.Hide();
            lbl800.Hide();
            //if (Screen.PrimaryScreen.WorkingArea.Width >= 1000)//
            //{
            //    //+"\n"+Screen.PrimaryScreen.WorkingArea.Height.ToString());
             this.BackgroundImage = lbl1024.Image;
            //}
            //else
            //{
            //    this.BackgroundImage = lbl800.Image;
            //}
			//menuItem4.Text="Báo cáo "+mDB.Tenbv.ToString();//bệnh viện Bạc Liêu

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
			
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain));
            System.Configuration.AppSettingsReader configurationAppSettings = new System.Configuration.AppSettingsReader();
            this.mnuMain = new System.Windows.Forms.MainMenu(this.components);
            this.mnuNhanSu = new System.Windows.Forms.MenuItem();
            this.menuItem3 = new System.Windows.Forms.MenuItem();
            this.menuItem8 = new System.Windows.Forms.MenuItem();
            this.menuItem_cc = new System.Windows.Forms.MenuItem();
            this.mnuTruyVan = new System.Windows.Forms.MenuItem();
            this.mnuDoTuoiTB = new System.Windows.Forms.MenuItem();
            this.mnuMucLuongBQ = new System.Windows.Forms.MenuItem();
            this.mnuThongKeTTGiaDinh = new System.Windows.Forms.MenuItem();
            this.mnuTinhHinhCV = new System.Windows.Forms.MenuItem();
            this.mnuNgheNghiepDT = new System.Windows.Forms.MenuItem();
            this.mnuGiaCanh = new System.Windows.Forms.MenuItem();
            this.mnuDiNuocNgoai = new System.Windows.Forms.MenuItem();
            this.menuItem1 = new System.Windows.Forms.MenuItem();
            this.mnuInLyLich = new System.Windows.Forms.MenuItem();
            this.mnuLyLichTrichNgang = new System.Windows.Forms.MenuItem();
            this.mnuLylichQTDT = new System.Windows.Forms.MenuItem();
            this.menuItem12 = new System.Windows.Forms.MenuItem();
            this.mnuDanhSachCNV = new System.Windows.Forms.MenuItem();
            this.mnuDanhSachConCBCNV = new System.Windows.Forms.MenuItem();
            this.mnuQuaTrinhCT = new System.Windows.Forms.MenuItem();
            this.mnuDanhSachNghiViec = new System.Windows.Forms.MenuItem();
            this.mnuTKNhanSu = new System.Windows.Forms.MenuItem();
            this.menuItem181 = new System.Windows.Forms.MenuItem();
            this.mnuDangKySDLD = new System.Windows.Forms.MenuItem();
            this.mnuDSDeNghiKyHDLD = new System.Windows.Forms.MenuItem();
            this.mnuDSCapSoBHXH = new System.Windows.Forms.MenuItem();
            this.mnuDSDeNghiNangLuong = new System.Windows.Forms.MenuItem();
            this.mnuTKLaoDongTienLuong = new System.Windows.Forms.MenuItem();
            this.menuItem24 = new System.Windows.Forms.MenuItem();
            this.mnuBCChatLuongBoPhan = new System.Windows.Forms.MenuItem();
            this.mnuBCChatLuongTrucThuoc = new System.Windows.Forms.MenuItem();
            this.mnuBCSLCongChucGiuCacChucVuDoBoNhiem = new System.Windows.Forms.MenuItem();
            this.mnuBCDSTienLuongVaChatLuongChatLuong = new System.Windows.Forms.MenuItem();
            this.mnuBCTongHopNgachBac = new System.Windows.Forms.MenuItem();
            this.mnuBCBienDongDSTienLuong = new System.Windows.Forms.MenuItem();
            this.mnuBCTangGiamBienChe = new System.Windows.Forms.MenuItem();
            this.mnuBCDSVaTienLuongCanBo = new System.Windows.Forms.MenuItem();
            this.menuItem33 = new System.Windows.Forms.MenuItem();
            this.mnuBCTucLuc = new System.Windows.Forms.MenuItem();
            this.mnuDSVaKetQuaNamgLuong = new System.Windows.Forms.MenuItem();
            this.menuItem36 = new System.Windows.Forms.MenuItem();
            this.mnuDSDangVienChiBo = new System.Windows.Forms.MenuItem();
            this.mnuBKDSCongChucVaLuong = new System.Windows.Forms.MenuItem();
            this.menuItem11 = new System.Windows.Forms.MenuItem();
            this.menuItem10 = new System.Windows.Forms.MenuItem();
            this.menuItem13 = new System.Windows.Forms.MenuItem();
            this.menuItem14 = new System.Windows.Forms.MenuItem();
            this.menuItem2 = new System.Windows.Forms.MenuItem();
            this.mnuDSLDVaQuyLuongNopBH = new System.Windows.Forms.MenuItem();
            this.mnuTienIch = new System.Windows.Forms.MenuItem();
            this.menuItem23 = new System.Windows.Forms.MenuItem();
            this.menuItem25 = new System.Windows.Forms.MenuItem();
            this.menuItem26 = new System.Windows.Forms.MenuItem();
            this.menuItem27 = new System.Windows.Forms.MenuItem();
            this.menuItem28 = new System.Windows.Forms.MenuItem();
            this.menuItem29 = new System.Windows.Forms.MenuItem();
            this.menuItem30 = new System.Windows.Forms.MenuItem();
            this.menuItem31 = new System.Windows.Forms.MenuItem();
            this.menuItem32 = new System.Windows.Forms.MenuItem();
            this.menuItem34 = new System.Windows.Forms.MenuItem();
            this.menuItem35 = new System.Windows.Forms.MenuItem();
            this.menuItem5 = new System.Windows.Forms.MenuItem();
            this.menuItem4 = new System.Windows.Forms.MenuItem();
            this.menuItem_tinh = new System.Windows.Forms.MenuItem();
            this.menuItem_quan = new System.Windows.Forms.MenuItem();
            this.menuItem_xa = new System.Windows.Forms.MenuItem();
            this.mnuMaNgachCC = new System.Windows.Forms.MenuItem();
            this.menuItem16 = new System.Windows.Forms.MenuItem();
            this.menuItem9 = new System.Windows.Forms.MenuItem();
            this.menuItem7 = new System.Windows.Forms.MenuItem();
            this.menuItem6 = new System.Windows.Forms.MenuItem();
            this.menuItem22 = new System.Windows.Forms.MenuItem();
            this.mnuQuanLyMK = new System.Windows.Forms.MenuItem();
            this.menuItem42 = new System.Windows.Forms.MenuItem();
            this.menuItem43 = new System.Windows.Forms.MenuItem();
            this.mnuSuaChuaSoLieu = new System.Windows.Forms.MenuItem();
            this.menuItem20 = new System.Windows.Forms.MenuItem();
            this.menuItem21 = new System.Windows.Forms.MenuItem();
            this.menuItem40 = new System.Windows.Forms.MenuItem();
            this.menuItem41 = new System.Windows.Forms.MenuItem();
            this.menuItem47 = new System.Windows.Forms.MenuItem();
            this.menuItem48 = new System.Windows.Forms.MenuItem();
            this.menuItem46 = new System.Windows.Forms.MenuItem();
            this.menuItem15 = new System.Windows.Forms.MenuItem();
            this.menuItem17 = new System.Windows.Forms.MenuItem();
            this.mnuThoat = new System.Windows.Forms.MenuItem();
            this.ilsIcons32 = new System.Windows.Forms.ImageList(this.components);
            this.lbl1024 = new System.Windows.Forms.Label();
            this.lbl800 = new System.Windows.Forms.Label();
            this.ListBar = new Human.ListBar.ButtonListBar();
            this.SuspendLayout();
            // 
            // mnuMain
            // 
            this.mnuMain.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.mnuNhanSu,
            this.mnuTruyVan,
            this.menuItem1,
            this.menuItem2,
            this.mnuTienIch,
            this.menuItem20,
            this.menuItem47,
            this.mnuThoat});
            // 
            // mnuNhanSu
            // 
            this.mnuNhanSu.Index = 0;
            this.mnuNhanSu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.menuItem3,
            this.menuItem8,
            this.menuItem_cc});
            this.mnuNhanSu.ShowShortcut = false;
            this.mnuNhanSu.Text = "1. Nhân Sự";
            // 
            // menuItem3
            // 
            this.menuItem3.Index = 0;
            this.menuItem3.MergeOrder = 1;
            this.menuItem3.Text = "&Lý lịch nhân viên";
            this.menuItem3.Click += new System.EventHandler(this.menuItem3_Click);
            // 
            // menuItem8
            // 
            this.menuItem8.Index = 1;
            this.menuItem8.Text = "-";
            // 
            // menuItem_cc
            // 
            this.menuItem_cc.Index = 2;
            this.menuItem_cc.MergeOrder = 72;
            this.menuItem_cc.Text = "Chấm công";
            this.menuItem_cc.Click += new System.EventHandler(this.menuItem_cc_Click);
            // 
            // mnuTruyVan
            // 
            this.mnuTruyVan.Index = 1;
            this.mnuTruyVan.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.mnuDoTuoiTB,
            this.mnuMucLuongBQ,
            this.mnuThongKeTTGiaDinh,
            this.mnuTinhHinhCV,
            this.mnuNgheNghiepDT,
            this.mnuGiaCanh,
            this.mnuDiNuocNgoai});
            this.mnuTruyVan.Text = "2. Truy vấn";
            // 
            // mnuDoTuoiTB
            // 
            this.mnuDoTuoiTB.Index = 0;
            this.mnuDoTuoiTB.MergeOrder = 2;
            this.mnuDoTuoiTB.Text = "Độ tuổi trung bình";
            this.mnuDoTuoiTB.Click += new System.EventHandler(this.mnuDoTuoiTB_Click);
            // 
            // mnuMucLuongBQ
            // 
            this.mnuMucLuongBQ.Index = 1;
            this.mnuMucLuongBQ.MergeOrder = 3;
            this.mnuMucLuongBQ.Text = " Mức lương bình quân";
            this.mnuMucLuongBQ.Click += new System.EventHandler(this.mnuMucLuongBQ_Click);
            // 
            // mnuThongKeTTGiaDinh
            // 
            this.mnuThongKeTTGiaDinh.Index = 2;
            this.mnuThongKeTTGiaDinh.MergeOrder = 4;
            this.mnuThongKeTTGiaDinh.Text = "Thống kê tình trạng gia đình";
            this.mnuThongKeTTGiaDinh.Click += new System.EventHandler(this.mnuThongKeTTGiaDinh_Click);
            // 
            // mnuTinhHinhCV
            // 
            this.mnuTinhHinhCV.Index = 3;
            this.mnuTinhHinhCV.MergeOrder = 5;
            this.mnuTinhHinhCV.Text = "Tình hình công việc";
            this.mnuTinhHinhCV.Click += new System.EventHandler(this.mnuTinhHinhCV_Click);
            // 
            // mnuNgheNghiepDT
            // 
            this.mnuNgheNghiepDT.Index = 4;
            this.mnuNgheNghiepDT.MergeOrder = 6;
            this.mnuNgheNghiepDT.Text = "Nghề nghiệp đào tạo";
            this.mnuNgheNghiepDT.Click += new System.EventHandler(this.mnuNgheNghiepDT_Click);
            // 
            // mnuGiaCanh
            // 
            this.mnuGiaCanh.Index = 5;
            this.mnuGiaCanh.MergeOrder = 7;
            this.mnuGiaCanh.Text = "Gia cảnh";
            this.mnuGiaCanh.Click += new System.EventHandler(this.mnuGiaCanh_Click);
            // 
            // mnuDiNuocNgoai
            // 
            this.mnuDiNuocNgoai.Index = 6;
            this.mnuDiNuocNgoai.MergeOrder = 8;
            this.mnuDiNuocNgoai.Text = "Đi nước ngoài";
            this.mnuDiNuocNgoai.Click += new System.EventHandler(this.mnuDiNuocNgoai_Click);
            // 
            // menuItem1
            // 
            this.menuItem1.Index = 2;
            this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.mnuInLyLich,
            this.mnuLyLichTrichNgang,
            this.mnuLylichQTDT,
            this.menuItem12,
            this.mnuDanhSachCNV,
            this.mnuDanhSachConCBCNV,
            this.mnuQuaTrinhCT,
            this.mnuDanhSachNghiViec,
            this.mnuTKNhanSu,
            this.menuItem181,
            this.mnuDangKySDLD,
            this.mnuDSDeNghiKyHDLD,
            this.mnuDSCapSoBHXH,
            this.mnuDSDeNghiNangLuong,
            this.mnuTKLaoDongTienLuong,
            this.menuItem24,
            this.mnuBCChatLuongBoPhan,
            this.mnuBCChatLuongTrucThuoc,
            this.mnuBCSLCongChucGiuCacChucVuDoBoNhiem,
            this.mnuBCDSTienLuongVaChatLuongChatLuong,
            this.mnuBCTongHopNgachBac,
            this.mnuBCBienDongDSTienLuong,
            this.mnuBCTangGiamBienChe,
            this.mnuBCDSVaTienLuongCanBo,
            this.menuItem33,
            this.mnuBCTucLuc,
            this.mnuDSVaKetQuaNamgLuong,
            this.menuItem36,
            this.mnuDSDangVienChiBo,
            this.mnuBKDSCongChucVaLuong,
            this.menuItem11,
            this.menuItem10});
            this.menuItem1.Text = "3. Báo cáo";
            // 
            // mnuInLyLich
            // 
            this.mnuInLyLich.Index = 0;
            this.mnuInLyLich.MergeOrder = 9;
            this.mnuInLyLich.Text = "In lý lịch";
            this.mnuInLyLich.Click += new System.EventHandler(this.mnuInLyLich_Click);
            // 
            // mnuLyLichTrichNgang
            // 
            this.mnuLyLichTrichNgang.Index = 1;
            this.mnuLyLichTrichNgang.MergeOrder = 10;
            this.mnuLyLichTrichNgang.Text = "In lý lịch trích ngang";
            this.mnuLyLichTrichNgang.Click += new System.EventHandler(this.mnuLyLichTrichNgang_Click);
            // 
            // mnuLylichQTDT
            // 
            this.mnuLylichQTDT.Index = 2;
            this.mnuLylichQTDT.MergeOrder = 11;
            this.mnuLylichQTDT.Text = "In lý lịch, quá trình đào tạo, gia cảnh";
            this.mnuLylichQTDT.Click += new System.EventHandler(this.mnuLylichQTDT_Click);
            // 
            // menuItem12
            // 
            this.menuItem12.Index = 3;
            this.menuItem12.Text = "-";
            // 
            // mnuDanhSachCNV
            // 
            this.mnuDanhSachCNV.Index = 4;
            this.mnuDanhSachCNV.MergeOrder = 12;
            this.mnuDanhSachCNV.Text = "Danh sách công nhân viên";
            this.mnuDanhSachCNV.Click += new System.EventHandler(this.mnuDanhSachCNV_Click);
            // 
            // mnuDanhSachConCBCNV
            // 
            this.mnuDanhSachConCBCNV.Index = 5;
            this.mnuDanhSachConCBCNV.MergeOrder = 13;
            this.mnuDanhSachConCBCNV.Text = "Danh sách con CB - CNV";
            this.mnuDanhSachConCBCNV.Click += new System.EventHandler(this.mnuDanhSachConCBCNV_Click);
            // 
            // mnuQuaTrinhCT
            // 
            this.mnuQuaTrinhCT.Index = 6;
            this.mnuQuaTrinhCT.MergeOrder = 14;
            this.mnuQuaTrinhCT.Text = "Quá trình công tác ";
            this.mnuQuaTrinhCT.Click += new System.EventHandler(this.mnuQuaTrinhCT_Click);
            // 
            // mnuDanhSachNghiViec
            // 
            this.mnuDanhSachNghiViec.Index = 7;
            this.mnuDanhSachNghiViec.MergeOrder = 15;
            this.mnuDanhSachNghiViec.Text = "Danh sách nhân viên mới nghỉ việc";
            this.mnuDanhSachNghiViec.Click += new System.EventHandler(this.mnuDanhSachNghiViec_Click);
            // 
            // mnuTKNhanSu
            // 
            this.mnuTKNhanSu.Index = 8;
            this.mnuTKNhanSu.MergeOrder = 16;
            this.mnuTKNhanSu.Text = "Thống kê nhân sự";
            this.mnuTKNhanSu.Click += new System.EventHandler(this.mnuTKNhanSu_Click);
            // 
            // menuItem181
            // 
            this.menuItem181.Index = 9;
            this.menuItem181.Text = "-";
            // 
            // mnuDangKySDLD
            // 
            this.mnuDangKySDLD.Index = 10;
            this.mnuDangKySDLD.MergeOrder = 17;
            this.mnuDangKySDLD.Text = "Đăng ký sử dụng lao động";
            this.mnuDangKySDLD.Click += new System.EventHandler(this.menuItem19_Click);
            // 
            // mnuDSDeNghiKyHDLD
            // 
            this.mnuDSDeNghiKyHDLD.Index = 11;
            this.mnuDSDeNghiKyHDLD.MergeOrder = 18;
            this.mnuDSDeNghiKyHDLD.Text = "Danh sách đề nghị ký HĐLĐ";
            this.mnuDSDeNghiKyHDLD.Click += new System.EventHandler(this.mnuDSDeNghiKyHDLD_Click);
            // 
            // mnuDSCapSoBHXH
            // 
            this.mnuDSCapSoBHXH.Index = 12;
            this.mnuDSCapSoBHXH.MergeOrder = 19;
            this.mnuDSCapSoBHXH.Text = "Danh sách lao động đề nghị cấp sổ BHXH";
            this.mnuDSCapSoBHXH.Click += new System.EventHandler(this.mnuDSCapSoBHXH_Click);
            // 
            // mnuDSDeNghiNangLuong
            // 
            this.mnuDSDeNghiNangLuong.Index = 13;
            this.mnuDSDeNghiNangLuong.MergeOrder = 20;
            this.mnuDSDeNghiNangLuong.Text = "Danh sách CB -CNV đề nghị nâng lương";
            this.mnuDSDeNghiNangLuong.Click += new System.EventHandler(this.mnuDSDeNghiNangLuong_Click);
            // 
            // mnuTKLaoDongTienLuong
            // 
            this.mnuTKLaoDongTienLuong.Index = 14;
            this.mnuTKLaoDongTienLuong.MergeOrder = 21;
            this.mnuTKLaoDongTienLuong.Text = "Thống kê lao động tiền lương";
            this.mnuTKLaoDongTienLuong.Click += new System.EventHandler(this.mnuTKLaoDongTienLuong_Click);
            // 
            // menuItem24
            // 
            this.menuItem24.Index = 15;
            this.menuItem24.Text = "-";
            // 
            // mnuBCChatLuongBoPhan
            // 
            this.mnuBCChatLuongBoPhan.Index = 16;
            this.mnuBCChatLuongBoPhan.MergeOrder = 22;
            this.mnuBCChatLuongBoPhan.Text = "Báo cáo chất lượng CBCC chia theo đơn vị bộ phận ";
            this.mnuBCChatLuongBoPhan.Click += new System.EventHandler(this.mnuBCChatLuongBoPhan_Click);
            // 
            // mnuBCChatLuongTrucThuoc
            // 
            this.mnuBCChatLuongTrucThuoc.Index = 17;
            this.mnuBCChatLuongTrucThuoc.MergeOrder = 23;
            this.mnuBCChatLuongTrucThuoc.Text = "Báo cáo chất lượng CBCC chia theo đơn vị trực thuộc";
            this.mnuBCChatLuongTrucThuoc.Click += new System.EventHandler(this.mnuBCChatLuongTrucThuoc_Click);
            // 
            // mnuBCSLCongChucGiuCacChucVuDoBoNhiem
            // 
            this.mnuBCSLCongChucGiuCacChucVuDoBoNhiem.Index = 18;
            this.mnuBCSLCongChucGiuCacChucVuDoBoNhiem.MergeOrder = 24;
            this.mnuBCSLCongChucGiuCacChucVuDoBoNhiem.Text = "Báo cáo số lượng công chức giữ các chức vụ lãnh đạo do bổ nhiệm";
            this.mnuBCSLCongChucGiuCacChucVuDoBoNhiem.Click += new System.EventHandler(this.mnuBCSLCongChucGiuCacChucVuDoBoNhiem_Click);
            // 
            // mnuBCDSTienLuongVaChatLuongChatLuong
            // 
            this.mnuBCDSTienLuongVaChatLuongChatLuong.Index = 19;
            this.mnuBCDSTienLuongVaChatLuongChatLuong.MergeOrder = 25;
            this.mnuBCDSTienLuongVaChatLuongChatLuong.Text = "Báo cáo danh sách, tiền lương và chất lượng cán bộ, công chức";
            this.mnuBCDSTienLuongVaChatLuongChatLuong.Click += new System.EventHandler(this.mnuBCDSTienLuongVaChatLuongChatLuong_Click);
            // 
            // mnuBCTongHopNgachBac
            // 
            this.mnuBCTongHopNgachBac.Index = 20;
            this.mnuBCTongHopNgachBac.MergeOrder = 26;
            this.mnuBCTongHopNgachBac.Text = "Báo cáo tổng hợp ngạch, bậc và phụ cấp cán bộ, công chức";
            this.mnuBCTongHopNgachBac.Click += new System.EventHandler(this.mnuBCTongHopNgachBac_Click);
            // 
            // mnuBCBienDongDSTienLuong
            // 
            this.mnuBCBienDongDSTienLuong.Index = 21;
            this.mnuBCBienDongDSTienLuong.MergeOrder = 27;
            this.mnuBCBienDongDSTienLuong.Text = "Báo cáo biến động danh sách, tiền lương phụ cấp cán bộ công chức";
            this.mnuBCBienDongDSTienLuong.Click += new System.EventHandler(this.mnuBCBienDongDSTienLuong_Click);
            // 
            // mnuBCTangGiamBienChe
            // 
            this.mnuBCTangGiamBienChe.Index = 22;
            this.mnuBCTangGiamBienChe.MergeOrder = 28;
            this.mnuBCTangGiamBienChe.Text = "Báo cáo tăng giảm biên chế - Quỹ lương";
            this.mnuBCTangGiamBienChe.Click += new System.EventHandler(this.mnuBCTangGiamBienChe_Click);
            // 
            // mnuBCDSVaTienLuongCanBo
            // 
            this.mnuBCDSVaTienLuongCanBo.Index = 23;
            this.mnuBCDSVaTienLuongCanBo.MergeOrder = 29;
            this.mnuBCDSVaTienLuongCanBo.Text = "Báo cáo danh sách và tiền lương cán bộ, công chức";
            this.mnuBCDSVaTienLuongCanBo.Click += new System.EventHandler(this.mnuBCDSVaTienLuongCanBo_Click);
            // 
            // menuItem33
            // 
            this.menuItem33.Index = 24;
            this.menuItem33.Text = "-";
            // 
            // mnuBCTucLuc
            // 
            this.mnuBCTucLuc.Index = 25;
            this.mnuBCTucLuc.MergeOrder = 30;
            this.mnuBCTucLuc.Text = "Báo cáo thực lực";
            this.mnuBCTucLuc.Click += new System.EventHandler(this.mnuBCTucLuc_Click);
            // 
            // mnuDSVaKetQuaNamgLuong
            // 
            this.mnuDSVaKetQuaNamgLuong.Index = 26;
            this.mnuDSVaKetQuaNamgLuong.MergeOrder = 31;
            this.mnuDSVaKetQuaNamgLuong.Text = "Danh sách và kết quả nâng bậc lương";
            this.mnuDSVaKetQuaNamgLuong.Click += new System.EventHandler(this.mnuDSVaKetQuaNamgLuong_Click);
            // 
            // menuItem36
            // 
            this.menuItem36.Index = 27;
            this.menuItem36.Text = "-";
            // 
            // mnuDSDangVienChiBo
            // 
            this.mnuDSDangVienChiBo.Index = 28;
            this.mnuDSDangVienChiBo.MergeOrder = 32;
            this.mnuDSDangVienChiBo.Text = "Danh sách Đảng viên chi bộ";
            this.mnuDSDangVienChiBo.Click += new System.EventHandler(this.mnuDSDangVienChiBo_Click);
            // 
            // mnuBKDSCongChucVaLuong
            // 
            this.mnuBKDSCongChucVaLuong.Index = 29;
            this.mnuBKDSCongChucVaLuong.MergeOrder = 33;
            this.mnuBKDSCongChucVaLuong.Text = "Bảng kê danh sách công chức viên chức và tiền lương";
            this.mnuBKDSCongChucVaLuong.Click += new System.EventHandler(this.mnuBKDSCongChucVaLuong_Click);
            // 
            // menuItem11
            // 
            this.menuItem11.Index = 30;
            this.menuItem11.Text = "-";
            // 
            // menuItem10
            // 
            this.menuItem10.Index = 31;
            this.menuItem10.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.menuItem13,
            this.menuItem14});
            this.menuItem10.MergeOrder = 34;
            this.menuItem10.Text = "Báo cáo ngày phép";
            // 
            // menuItem13
            // 
            this.menuItem13.Index = 0;
            this.menuItem13.MergeOrder = 35;
            this.menuItem13.Text = "&1. Bảng chấm công";
            this.menuItem13.Click += new System.EventHandler(this.menuItem13_Click);
            // 
            // menuItem14
            // 
            this.menuItem14.Index = 1;
            this.menuItem14.MergeOrder = 36;
            this.menuItem14.Text = "&2. Báo cáo ngày phép trong năm";
            this.menuItem14.Click += new System.EventHandler(this.menuItem14_Click_1);
            // 
            // menuItem2
            // 
            this.menuItem2.Index = 3;
            this.menuItem2.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.mnuDSLDVaQuyLuongNopBH});
            this.menuItem2.Text = "4. Bảo hiểm xã hội";
            // 
            // mnuDSLDVaQuyLuongNopBH
            // 
            this.mnuDSLDVaQuyLuongNopBH.Index = 0;
            this.mnuDSLDVaQuyLuongNopBH.MergeOrder = 50;
            this.mnuDSLDVaQuyLuongNopBH.Text = "Danh sách lao động và quỹ tiền lương trích nộp BHXH";
            this.mnuDSLDVaQuyLuongNopBH.Click += new System.EventHandler(this.mnuDSLDVaQuyLuongNopBH_Click);
            // 
            // mnuTienIch
            // 
            this.mnuTienIch.Index = 4;
            this.mnuTienIch.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.menuItem23,
            this.mnuMaNgachCC,
            this.menuItem16,
            this.menuItem9,
            this.menuItem7,
            this.menuItem6,
            this.menuItem22,
            this.mnuQuanLyMK,
            this.menuItem42,
            this.menuItem43,
            this.mnuSuaChuaSoLieu});
            this.mnuTienIch.ShowShortcut = false;
            this.mnuTienIch.Text = "5. Tiện ích ";
            // 
            // menuItem23
            // 
            this.menuItem23.Index = 0;
            this.menuItem23.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.menuItem25,
            this.menuItem26,
            this.menuItem27,
            this.menuItem28,
            this.menuItem29,
            this.menuItem30,
            this.menuItem31,
            this.menuItem32,
            this.menuItem34,
            this.menuItem35,
            this.menuItem5,
            this.menuItem4,
            this.menuItem_tinh,
            this.menuItem_quan,
            this.menuItem_xa});
            this.menuItem23.MergeOrder = 50;
            this.menuItem23.Text = "Danh mục";
            this.menuItem23.Click += new System.EventHandler(this.menuItem23_Click_1);
            // 
            // menuItem25
            // 
            this.menuItem25.Index = 0;
            this.menuItem25.MergeOrder = 51;
            this.menuItem25.Text = "Bộ phận";
            this.menuItem25.Click += new System.EventHandler(this.menuItem25_Click);
            // 
            // menuItem26
            // 
            this.menuItem26.Index = 1;
            this.menuItem26.MergeOrder = 52;
            this.menuItem26.Text = "Chức vụ";
            this.menuItem26.Click += new System.EventHandler(this.menuItem26_Click);
            // 
            // menuItem27
            // 
            this.menuItem27.Index = 2;
            this.menuItem27.MergeOrder = 53;
            this.menuItem27.Text = "Học vấn";
            this.menuItem27.Click += new System.EventHandler(this.menuItem27_Click);
            // 
            // menuItem28
            // 
            this.menuItem28.Index = 3;
            this.menuItem28.MergeOrder = 54;
            this.menuItem28.Text = "Ngoại ngữ";
            this.menuItem28.Click += new System.EventHandler(this.menuItem28_Click);
            // 
            // menuItem29
            // 
            this.menuItem29.Index = 4;
            this.menuItem29.MergeOrder = 55;
            this.menuItem29.Text = "Ngành đào tạo";
            this.menuItem29.Click += new System.EventHandler(this.menuItem29_Click);
            // 
            // menuItem30
            // 
            this.menuItem30.Index = 5;
            this.menuItem30.MergeOrder = 56;
            this.menuItem30.Text = "Bằng cấp";
            this.menuItem30.Click += new System.EventHandler(this.menuItem30_Click);
            // 
            // menuItem31
            // 
            this.menuItem31.Index = 6;
            this.menuItem31.MergeOrder = 57;
            this.menuItem31.Text = "Nơi đăng ký khám chữa bệnh";
            this.menuItem31.Click += new System.EventHandler(this.menuItem31_Click);
            // 
            // menuItem32
            // 
            this.menuItem32.Index = 7;
            this.menuItem32.MergeOrder = 58;
            this.menuItem32.Text = "Lý do nghỉ việc";
            this.menuItem32.Click += new System.EventHandler(this.menuItem32_Click);
            // 
            // menuItem34
            // 
            this.menuItem34.Index = 8;
            this.menuItem34.MergeOrder = 59;
            this.menuItem34.Text = "Dân tộc";
            this.menuItem34.Click += new System.EventHandler(this.menuItem34_Click);
            // 
            // menuItem35
            // 
            this.menuItem35.Index = 9;
            this.menuItem35.MergeOrder = 60;
            this.menuItem35.Text = "Hợp đồng";
            this.menuItem35.Click += new System.EventHandler(this.menuItem35_Click);
            // 
            // menuItem5
            // 
            this.menuItem5.Index = 10;
            this.menuItem5.MergeOrder = 61;
            this.menuItem5.Text = "Chức danh";
            this.menuItem5.Click += new System.EventHandler(this.menuItem5_Click_1);
            // 
            // menuItem4
            // 
            this.menuItem4.Index = 11;
            this.menuItem4.Text = "-";
            // 
            // menuItem_tinh
            // 
            this.menuItem_tinh.Index = 12;
            this.menuItem_tinh.MergeOrder = 62;
            this.menuItem_tinh.Text = "Tỉnh/Thành phố";
            this.menuItem_tinh.Click += new System.EventHandler(this.menuItem_tinh_Click);
            // 
            // menuItem_quan
            // 
            this.menuItem_quan.Index = 13;
            this.menuItem_quan.MergeOrder = 63;
            this.menuItem_quan.Text = "Quận/Huyện";
            this.menuItem_quan.Click += new System.EventHandler(this.menuItem_quan_Click);
            // 
            // menuItem_xa
            // 
            this.menuItem_xa.Index = 14;
            this.menuItem_xa.MergeOrder = 64;
            this.menuItem_xa.Text = "Xã/Phường";
            this.menuItem_xa.Click += new System.EventHandler(this.menuItem_xa_Click);
            // 
            // mnuMaNgachCC
            // 
            this.mnuMaNgachCC.Index = 1;
            this.mnuMaNgachCC.MergeOrder = 65;
            this.mnuMaNgachCC.Text = "Mã ngạch công chức";
            this.mnuMaNgachCC.Click += new System.EventHandler(this.mnuMaNgachCC_Click);
            // 
            // menuItem16
            // 
            this.menuItem16.Index = 2;
            this.menuItem16.MergeOrder = 66;
            this.menuItem16.Text = "Thay đổi lương tối thiểu";
            this.menuItem16.Click += new System.EventHandler(this.menuItem16_Click_1);
            // 
            // menuItem9
            // 
            this.menuItem9.Index = 3;
            this.menuItem9.MergeOrder = 67;
            this.menuItem9.Text = "In thẻ nhân viên";
            this.menuItem9.Click += new System.EventHandler(this.menuItem9_Click);
            // 
            // menuItem7
            // 
            this.menuItem7.Index = 4;
            this.menuItem7.Text = "-";
            // 
            // menuItem6
            // 
            this.menuItem6.Index = 5;
            this.menuItem6.MergeOrder = 68;
            this.menuItem6.Text = "Tạo dữ liệu chấm công ";
            this.menuItem6.Click += new System.EventHandler(this.menuItem6_Click);
            // 
            // menuItem22
            // 
            this.menuItem22.Index = 6;
            this.menuItem22.Text = "-";
            // 
            // mnuQuanLyMK
            // 
            this.mnuQuanLyMK.Index = 7;
            this.mnuQuanLyMK.MergeOrder = 69;
            this.mnuQuanLyMK.Text = "Quản lý mật khẩu";
            this.mnuQuanLyMK.Click += new System.EventHandler(this.mnuQuanLyMK_Click);
            // 
            // menuItem42
            // 
            this.menuItem42.Index = 8;
            this.menuItem42.MergeOrder = 70;
            this.menuItem42.Text = "Khai báo thông số hệ thống";
            this.menuItem42.Click += new System.EventHandler(this.menuItem42_Click);
            // 
            // menuItem43
            // 
            this.menuItem43.Index = 9;
            this.menuItem43.Text = "-";
            // 
            // mnuSuaChuaSoLieu
            // 
            this.mnuSuaChuaSoLieu.Index = 10;
            this.mnuSuaChuaSoLieu.MergeOrder = 71;
            this.mnuSuaChuaSoLieu.Text = "Logout";
            this.mnuSuaChuaSoLieu.Click += new System.EventHandler(this.mnuSuaChuaSoLieu_Click);
            // 
            // menuItem20
            // 
            this.menuItem20.Index = 5;
            this.menuItem20.MdiList = true;
            this.menuItem20.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.menuItem21,
            this.menuItem40,
            this.menuItem41});
            this.menuItem20.Text = "&6. Cửa sổ";
            // 
            // menuItem21
            // 
            this.menuItem21.Index = 0;
            this.menuItem21.Text = "&1. Hiển thị của sổ theo chiều dọc";
            // 
            // menuItem40
            // 
            this.menuItem40.Index = 1;
            this.menuItem40.Text = "&2.  Hiển thị của sổ theo chiều ngang";
            // 
            // menuItem41
            // 
            this.menuItem41.Index = 2;
            this.menuItem41.Text = "&3.Đóng tất cả của sổ";
            // 
            // menuItem47
            // 
            this.menuItem47.Index = 6;
            this.menuItem47.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.menuItem48,
            this.menuItem46,
            this.menuItem15,
            this.menuItem17});
            this.menuItem47.Text = "&7. Hướng dẫn";
            // 
            // menuItem48
            // 
            this.menuItem48.Index = 0;
            this.menuItem48.Text = "&1. Hướng dẫn";
            // 
            // menuItem46
            // 
            this.menuItem46.Index = 1;
            this.menuItem46.Text = "&2. About Human 2007";
            this.menuItem46.Click += new System.EventHandler(this.menuItem46_Click);
            // 
            // menuItem15
            // 
            this.menuItem15.Index = 2;
            this.menuItem15.Text = "-";
            // 
            // menuItem17
            // 
            this.menuItem17.Index = 3;
            this.menuItem17.Text = "Chuyển dữ liệu";
            this.menuItem17.Click += new System.EventHandler(this.menuItem17_Click_1);
            // 
            // mnuThoat
            // 
            this.mnuThoat.Index = 7;
            this.mnuThoat.Text = "&Kết thúc";
            this.mnuThoat.Click += new System.EventHandler(this.mnuThoat_Click_1);
            // 
            // ilsIcons32
            // 
            this.ilsIcons32.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("ilsIcons32.ImageStream")));
            this.ilsIcons32.TransparentColor = System.Drawing.Color.Transparent;
            this.ilsIcons32.Images.SetKeyName(0, "");
            this.ilsIcons32.Images.SetKeyName(1, "");
            this.ilsIcons32.Images.SetKeyName(2, "");
            this.ilsIcons32.Images.SetKeyName(3, "");
            this.ilsIcons32.Images.SetKeyName(4, "");
            this.ilsIcons32.Images.SetKeyName(5, "SMS.ICO");
            this.ilsIcons32.Images.SetKeyName(6, "ManageAddress.gif");
            this.ilsIcons32.Images.SetKeyName(7, "ManageUser.gif");
            this.ilsIcons32.Images.SetKeyName(8, "education.ico");
            // 
            // lbl1024
            // 
            this.lbl1024.Image = ((System.Drawing.Image)(resources.GetObject("lbl1024.Image")));
            this.lbl1024.Location = new System.Drawing.Point(508, 357);
            this.lbl1024.Name = "lbl1024";
            this.lbl1024.Size = new System.Drawing.Size(72, 48);
            this.lbl1024.TabIndex = 4;
            // 
            // lbl800
            // 
            this.lbl800.Image = ((System.Drawing.Image)(resources.GetObject("lbl800.Image")));
            this.lbl800.Location = new System.Drawing.Point(223, 151);
            this.lbl800.Name = "lbl800";
            this.lbl800.Size = new System.Drawing.Size(72, 16);
            this.lbl800.TabIndex = 3;
            // 
            // ListBar
            // 
            this.ListBar.AutoScroll = true;
            this.ListBar.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.ListBar.ButtonWidth = 96;
            this.ListBar.Dock = System.Windows.Forms.DockStyle.Left;
            this.ListBar.ImageList = null;
            this.ListBar.Location = new System.Drawing.Point(0, 0);
            this.ListBar.Name = "ListBar";
            this.ListBar.Size = new System.Drawing.Size(99, 8);
            this.ListBar.TabIndex = 6;
            this.ListBar.ToolTip = null;
            this.ListBar.Visible = false;
            // 
            // frmMain
            // 
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
            this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.ClientSize = new System.Drawing.Size(792, 8);
            this.Controls.Add(this.ListBar);
            this.Controls.Add(this.lbl1024);
            this.Controls.Add(this.lbl800);
            this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.IsMdiContainer = ((bool)(configurationAppSettings.GetValue("frmQuanLyNhanSu.IsMdiContainer", typeof(bool))));
            this.Menu = this.mnuMain;
            this.Name = "frmMain";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "Quản lý nhân sự";
            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
            this.Load += new System.EventHandler(this.frmMain_Load);
            this.ResumeLayout(false);

		}
		#endregion

		/// <summary>
		/// The main entry point for the application.
		/// </summary>
        //[STAThread]
        //static void Main() 
        //{			
        //    Application.Run(new frmMain());							
        //}

		

		
		public void dong_menu()
		{
			mnuNhanSu.Enabled=false;
			mnuTruyVan.Enabled=false;
			menuItem1.Enabled=false;
			menuItem2.Enabled=false;
			mnuTienIch.Enabled=false;
		}
		public void mo_menu()
		{
			mnuNhanSu.Enabled=true;
			mnuTruyVan.Enabled=true;
			menuItem1.Enabled=true;
			menuItem2.Enabled=true;
			mnuTienIch.Enabled=true;
		}

		private void mnuDoTuoiTB_Click(object sender, System.EventArgs e)
		{
            frmDoTuoiTrungBinh frm = new frmDoTuoiTrungBinh();
            frm.ShowDialog(this);
		}

		private void mnuMucLuongBQ_Click(object sender, System.EventArgs e)
		{
            //frmMucLuongBQ frm = new frmMucLuongBQ();
            //frm.MdiParent = this;
            //frm.Show();
		}

		private void mnuThongKeTTGiaDinh_Click(object sender, System.EventArgs e)
		{
            //frmThongKeTTGiaDinh frm = new frmThongKeTTGiaDinh();
            //frm.MdiParent = this;
            //frm.Show();
		}

		private void mnuTinhHinhCV_Click(object sender, System.EventArgs e)
		{
            //frmTinhHinhCongViec frm = new frmTinhHinhCongViec();
            //frm.MdiParent = this;
            //frm.Show();
		}

		private void mnuNgheNghiepDT_Click(object sender, System.EventArgs e)
		{
            //frmNgheNghiepDaoTao frm = new frmNgheNghiepDaoTao();
            //frm.MdiParent = this;
            //frm.Show();
		}

		private void mnuGiaCanh_Click(object sender, System.EventArgs e)
		{
            //frmGiaCanh frm = new frmGiaCanh();
            //frm.MdiParent = this;
            //frm.Show();
		}

		private void mnuDiNuocNgoai_Click(object sender, System.EventArgs e)
		{
            //frmDiNuocNgoai frm = new frmDiNuocNgoai();
            //frm.MdiParent = this;
            //frm.Show();
		}

		private void mnuInLyLich_Click(object sender, System.EventArgs e)
		{
            frmInLyLich frm = new frmInLyLich("");
           // frm.MdiParent = this;
            frm.ShowDialog(this);
		}

		private void mnuLyLichTrichNgang_Click(object sender, System.EventArgs e)
		{
            frmInLyLichTrichNgang frm = new frmInLyLichTrichNgang();
            
            frm.ShowDialog(this);
		}

		private void mnuLylichQTDT_Click(object sender, System.EventArgs e)
		{
            frmLyLichDaoTaoGiaCanh frm = new frmLyLichDaoTaoGiaCanh();
            
            frm.ShowDialog( this);
		}

		private void mnuDanhSachCNV_Click(object sender, System.EventArgs e)
		{
            frmDanhSachNV frm = new frmDanhSachNV();
            frm.MdiParent = this;
            frm.Show();

		}

		private void mnuDanhSachConCBCNV_Click(object sender, System.EventArgs e)
		{
            frmDanhSachConCB frm = new frmDanhSachConCB();
           // frm.MdiParent = this;
            frm.ShowDialog(this);
		}

		private void mnuQuaTrinhCT_Click(object sender, System.EventArgs e)
		{
            frmQuaTrinhCongTac frm = new frmQuaTrinhCongTac();
            //frm.MdiParent = this;
            frm.ShowDialog (this);
		}

		private void mnuDanhSachNghiViec_Click(object sender, System.EventArgs e)
		{
            frmDanhSachNVNghiViec frm = new frmDanhSachNVNghiViec();
            frm.ShowDialog(this);

		}

		private void mnuTKNhanSu_Click(object sender, System.EventArgs e)
		{
            frmThongKeNhanSu frm = new frmThongKeNhanSu();
            //frmBCThongkeNhanLuc frm=new frmBCThongkeNhanLuc();
          //  frm.MdiParent = this;
            frm.ShowDialog(this);
		}

		private void menuItem19_Click(object sender, System.EventArgs e)
		{
            frmDangKyLaoDong frm = new frmDangKyLaoDong();
            //frm.MdiParent = this;
            frm.ShowDialog();

		}

		private void mnuDSDeNghiKyHDLD_Click(object sender, System.EventArgs e)
		{
            frmDSDeNghiKyHDLD frm = new frmDSDeNghiKyHDLD();
           // frm.MdiParent = this;
            frm.ShowDialog();

		}

		private void mnuDSCapSoBHXH_Click(object sender, System.EventArgs e)
		{
            frmDSDenghiCSBHXH frm = new frmDSDenghiCSBHXH();
            //frm.MdiParent = this;
            frm.ShowDialog();

		}

		private void mnuDSDeNghiNangLuong_Click(object sender, System.EventArgs e)
		{
            frmDanhSachCBCNVDeNghiNangLuong frm = new frmDanhSachCBCNVDeNghiNangLuong();
            //frm.MdiParent = this;
            frm.ShowDialog();

		}

		private void mnuTKLaoDongTienLuong_Click(object sender, System.EventArgs e)
		{
            frmThongKeLDTienLuong frm = new frmThongKeLDTienLuong();
            frm.MdiParent = this;
            frm.Show();

		}

		private void mnuBCChatLuongBoPhan_Click(object sender, System.EventArgs e)
		{
            //frmBCChatLuongCBTheoDVTrucThuoc frm = new frmBCChatLuongCBTheoDVTrucThuoc();			
            //frm.MdiParent = this;
            //frm.Show();

		}

		private void mnuBCChatLuongTrucThuoc_Click(object sender, System.EventArgs e)
		{
            //frmBCChatLuongCBTheoBoPhan frm = new frmBCChatLuongCBTheoBoPhan();
            //frm.MdiParent = this;
            //frm.Show();

		}

		private void mnuBCSLCongChucGiuCacChucVuDoBoNhiem_Click(object sender, System.EventArgs e)
		{
            //frmBCSoLuongCCGiuChucVuDoBoNhiem frm = new frmBCSoLuongCCGiuChucVuDoBoNhiem();
            //frm.MdiParent = this;
            //frm.Show();

		}

		private void mnuBCDSTienLuongVaChatLuongChatLuong_Click(object sender, System.EventArgs e)
		{
            //frmBCDanhSachVaTienLuongCBCC frm = new frmBCDanhSachVaTienLuongCBCC();
            //frm.MdiParent = this;
            //frm.Show();

		}

		private void mnuBCTongHopNgachBac_Click(object sender, System.EventArgs e)
		{
            //frmBCTongHopNgachBacCBCC frm = new frmBCTongHopNgachBacCBCC();
            //frm.MdiParent = this;
            //frm.Show();

		}

		private void mnuBCBienDongDSTienLuong_Click(object sender, System.EventArgs e)
		{
            //frmBCBienDongDSTLPhuCapCBCC frm = new frmBCBienDongDSTLPhuCapCBCC();
            //frm.MdiParent = this;
            //frm.Show();

		}

		private void mnuBCTangGiamBienChe_Click(object sender, System.EventArgs e)
		{
            //frmBCTangGiamBienCheQuyLuong frm = new frmBCTangGiamBienCheQuyLuong();
            //frm.MdiParent = this;
            //frm.Show();

		}

		private void mnuBCDSVaTienLuongCanBo_Click(object sender, System.EventArgs e)
		{
            //frmBCDSTLPhuCapCBCC frm = new frmBCDSTLPhuCapCBCC();
            //frm.MdiParent = this;
            //frm.Show();

		}

		private void mnuBCTucLuc_Click(object sender, System.EventArgs e)
		{
            //frmBaoCaoThucLuc frm = new frmBaoCaoThucLuc();
            //frm.MdiParent = this;
            //frm.Show();

		}

		private void mnuDSVaKetQuaNamgLuong_Click(object sender, System.EventArgs e)
		{
            //frmDanhSachVaKetQuaNangLuong frm = new frmDanhSachVaKetQuaNangLuong();
            //frm.MdiParent = this;
            //frm.Show();

		}

		private void mnuDSDangVienChiBo_Click(object sender, System.EventArgs e)
		{
            //frmDanhSachDangChiBo frm = new frmDanhSachDangChiBo();
            //frm.MdiParent = this;
            //frm.Show();

		}

		private void mnuBKDSCongChucVaLuong_Click(object sender, System.EventArgs e)
		{
            //frmBKDanhSachCongChucTienLuong frm = new frmBKDanhSachCongChucTienLuong();
            //frm.MdiParent = this;
            //frm.Show();

		}

		private void mnuDSLDVaQuyLuongNopBH_Click(object sender, System.EventArgs e)
		{
            frmDSLaoDongVaQuyLuongTrichNopBH frm = new frmDSLaoDongVaQuyLuongTrichNopBH();
            frm.MdiParent = this;
            frm.Show();
            //frmbc_trichnop_bhiem f = new frmbc_trichnop_bhiem();
            //f.ShowDialog();

		}

		private void mnuBangDoiChieuNopBH_Click(object sender, System.EventArgs e)
		{
            //frmBangDoiChieuNopBHXH frm = new frmBangDoiChieuNopBHXH();
            //frm.MdiParent = this;
            //frm.Show();

		}

		private void mnuDSLDDieuChinhMucLuong_Click(object sender, System.EventArgs e)
		{
            //frmDSLaoDongDieuChinhMucLuongPhuCapNopBHXH frm = new frmDSLaoDongDieuChinhMucLuongPhuCapNopBHXH();
            //frm.MdiParent = this;
            //frm.Show();

		}

		private void mnuDSLDDieuChinhTangGiamNopBH_Click(object sender, System.EventArgs e)
		{
            //frmDSLaoDongDieuTangGiamMucNopBHXH frm = new frmDSLaoDongDieuTangGiamMucNopBHXH();
            //frm.MdiParent = this;
            //frm.Show();

		}

		private void mnuDanhMuc_Click(object sender, System.EventArgs e)
		{
            //frmDanhMuc frm = new frmDanhMuc();
            //frm.MdiParent = this;
            //frm.Show();

		}

		private void mnuMaNgachCC_Click(object sender, System.EventArgs e)
		{
            frmDanhMucNgachCongChuc frm = new frmDanhMucNgachCongChuc();
            frm.MdiParent = this;
            frm.Show();
            //frmMangach f = new frmMangach();
            //f.MdiParent = this;
            //f.Show();

		}

		private void mnuQuanLyMK_Click(object sender, System.EventArgs e)
		{
            //frmQuanLyMatKhau frm = new frmQuanLyMatKhau("");
            ////frm.MdiParent = this;
            //frm.ShowDialog();
            xml_menu();
            frmRight f = new frmRight(mDB);
            f.ShowDialog(this);

		}

		private void mnuThoat_Click_1(object sender, System.EventArgs e)
		{
			Application.Exit();			
		}
        private void xml_menu()
        {
            DataSet dsxml = new DataSet();
            dsxml.Tables.Add();
            DataColumn dc = new DataColumn();
            dc.ColumnName = "loai";
            dc.DataType = Type.GetType("System.String");
            dsxml.Tables[0].Columns.Add(dc);
            dc = new DataColumn();
            dc.ColumnName = "tenloai";
            dc.DataType = Type.GetType("System.String");
            dsxml.Tables[0].Columns.Add(dc);
            dc = new DataColumn();
            dc.ColumnName = "id";
            dc.DataType = Type.GetType("System.String");
            dsxml.Tables[0].Columns.Add(dc);
            dc = new DataColumn();
            dc.ColumnName = "ten";
            dc.DataType = Type.GetType("System.String");
            dsxml.Tables[0].Columns.Add(dc);

            for (int i = 0; i < this.mnuMain.MenuItems.Count - 3; i++)
            {
                for (int j = 0; j < this.mnuMain.MenuItems[i].MenuItems.Count; j++)
                {
                    if (this.mnuMain.MenuItems[i].MenuItems[j].MenuItems.Count == 0)
                    {
                        if (this.mnuMain.MenuItems[i].MenuItems[j].Text != "-")
                            ins_items(dsxml, i.ToString().PadLeft(3, '0'), 
                                this.mnuMain.MenuItems[i].Text.Replace("&", ""), 
                                this.mnuMain.MenuItems[i].MenuItems[j].MergeOrder.ToString().PadLeft(3, '0'),
                                this.mnuMain.MenuItems[i].MenuItems[j].Text.Replace("&", ""));
                    }
                    else
                    {
                        for (int k = 0; k < this.mnuMain.MenuItems[i].MenuItems[j].MenuItems.Count; k++)
                            if (this.mnuMain.MenuItems[i].MenuItems[j].MenuItems[k].Text != "-")
                                ins_items(dsxml, i.ToString().PadLeft(3, '0'), this.mnuMain.MenuItems[i].Text.Replace("&", ""), this.mnuMain.MenuItems[i].MenuItems[j].MenuItems[k].MergeOrder.ToString().PadLeft(3, '0'), this.mnuMain.MenuItems[i].MenuItems[j].MenuItems[k].Text.Replace("&", ""));
                    }
                }
            }
            dsxml.WriteXml("..\\..\\..\\xml\\m_menubar.xml", XmlWriteMode.WriteSchema);
        }
        private void ins_items(DataSet dsxml, string loai, string tenloai, string id, string ten)
        {
            DataRow r = dsxml.Tables[0].NewRow();
            r["loai"] = loai;
            r["tenloai"] = tenloai;
            r["id"] = id;
            r["ten"] = ten;
            dsxml.Tables[0].Rows.Add(r);
        }
		private void mnuSuaChuaSoLieu_Click(object sender, System.EventArgs e)
		{
            frmLogin f=new frmLogin();
            f.ShowDialog();
            if (f.ten_nd != "")
            {
                ten1 = f.ten_nd;
                ma = f.c_d;
                s_maquyen = f.maquyen;
                sten1 = f.sten;
                gan_right();
            }
            else
                Application.Exit();
            //    gan_left();
		}
		private void gan_left()
		{
			try
			{
				int stt=0;
				for(int i=0;i<this.mnuMain.MenuItems.Count-1;i++)
				{
					for(int j=0;j<this.mnuMain.MenuItems[i].MenuItems.Count;j++)
					{
						this.mnuMain.MenuItems[i].MenuItems[j].Enabled=ma.IndexOf(stt.ToString().PadLeft(2,'0')+"+")!=-1;
						if (this.mnuMain.MenuItems[i].MenuItems[j].Text!="-")	stt++;
					}
				}
				this.mnuSuaChuaSoLieu.Text="&B - Log Off "+ten1.ToString().Trim();
				this.mnuSuaChuaSoLieu.Enabled=true;			
			}
			catch{}
		}

		private void menuItem3_Click(object sender, System.EventArgs e)
		{
            //m_toolTip = new ToolTip();
            //setListBar();
            frmLyLichNV f1=new frmLyLichNV();
            f1.MdiParent=this;
            f1.Show();
		}

		private void mnuHuongDan_Click(object sender, System.EventArgs e)
		{
			try
			{
				System.Diagnostics.Process.Start(@"..\..\..\help\Human.chm");
			}
			catch
			{
				MessageBox.Show("Không tìm thấy đường dẫn đến file trợ giúp","Trợ giúp");
			}			
		}

		private void menuItem6_Click(object sender, System.EventArgs e)
		{
            frmThangnam f = new frmThangnam(ten1);
            f.ShowDialog(this);

		}

		private void menuItem5_Click(object sender, System.EventArgs e)
		{
            //frmDSDenghiCSBHXH f=new frmDSDenghiCSBHXH();
            //f.ShowDialog();
		}

		private void mnuBophan_Click(object sender, System.EventArgs e)
		{
            //frmDMBophan bp=new frmDMBophan();
            //bp.MdiParent=this;
            //bp.Show();
		}

		private void menuItem7_Click(object sender, System.EventArgs e)
		{
            //frmDSNhanlucngoaiBC fbc=new frmDSNhanlucngoaiBC();
            //fbc.ShowDialog();
		}

		private void menuItem9_Click(object sender, System.EventArgs e)
		{
            frmInthe f = new frmInthe();
            f.ShowDialog();
		}

		private void menuItem10_Click(object sender, System.EventArgs e)
		{
            //frmBCDSCBCC f=new frmBCDSCBCC();
            //f.ShowDialog();
		}

		private void menuItem11_Click(object sender, System.EventArgs e)
		{
            //frmBCDSCBtheohethongTC f=new frmBCDSCBtheohethongTC();
            //f.ShowDialog();
		}

		private void menuItem13_Click(object sender, System.EventArgs e)
		{
            Baocao_chamcong f = new Baocao_chamcong();
            f.ShowDialog();
		}
        
		private void menuItem14_Click(object sender, System.EventArgs e)
		{
            //frmBCThongkeNhanLuc nl=new frmBCThongkeNhanLuc();
            //nl.ShowDialog();
		}

		private void menuItem15_Click(object sender, System.EventArgs e)
		{
            //frmBCnhanlucDDtruong f=new frmBCnhanlucDDtruong();
            //f.ShowDialog();
		}

		private void menuItem16_Click(object sender, System.EventArgs e)
		{
			
		}

		private void menuItem17_Click(object sender, System.EventArgs e)
		{
            //frmTheodoiNS td=new frmTheodoiNS();
            //td.ShowDialog();
		}		
		

		private void menuItem20_Click(object sender, System.EventArgs e)
		{
            //frmBCthunhapnguoilaodong ld=new frmBCthunhapnguoilaodong();
            //ld.Show();
		}

		private void menuItem21_Click(object sender, System.EventArgs e)
		{
			
		}

		private void mnurestore_Click(object sender, System.EventArgs e)
		{
			
		}	

		private void menuItem23_Click(object sender, System.EventArgs e)
		{
            //frm_luongtoithieu f =new frm_luongtoithieu();
            //f.ShowDialog();
		}

		private void menuItem25_Click(object sender, System.EventArgs e)
		{
            frmBophan f = new frmBophan();
            f.ShowDialog();
		}

		private void menuItem26_Click(object sender, System.EventArgs e)
		{
            frmChucv f = new frmChucv();
            f.ShowDialog();
		}

		private void menuItem27_Click(object sender, System.EventArgs e)
		{
            frmHocvan f =new frmHocvan();
            f.ShowDialog();
		}

		private void menuItem28_Click(object sender, System.EventArgs e)
		{
            frmNgoaingu f = new frmNgoaingu();
            f.ShowDialog();
		}

		private void menuItem29_Click(object sender, System.EventArgs e)
		{
            frmNganhdaotao f = new frmNganhdaotao();
            f.ShowDialog();
		}

		private void menuItem30_Click(object sender, System.EventArgs e)
		{
            frmBangcap f = new frmBangcap();
            f.ShowDialog();
		}

		private void menuItem31_Click(object sender, System.EventArgs e)
		{
            frmDonvi f = new frmDonvi();
            f.ShowDialog();
		}

		private void menuItem32_Click(object sender, System.EventArgs e)
		{
            frmNghiviec f = new frmNghiviec();
            f.ShowDialog();
		}

		private void menuItem34_Click(object sender, System.EventArgs e)
		{
            frmDantoc f = new frmDantoc();
            f.ShowDialog();
		}

		private void menuItem35_Click(object sender, System.EventArgs e)
		{
            frmdmHopdong f = new frmdmHopdong();
            f.ShowDialog();
		}

		private void menuItem37_Click(object sender, System.EventArgs e)
		{
            //bieu_tinhhinhCCVCtheoquy f =new bieu_tinhhinhCCVCtheoquy();
            //f.ShowDialog();
		}

		private void menuItem38_Click(object sender, System.EventArgs e)
		{
            //ds_trinhdolanhdao f =new ds_trinhdolanhdao();
            //f.ShowDialog();
		}

		private void menuItem39_Click(object sender, System.EventArgs e)
		{
            //frmNgoaibienche f =new frmNgoaibienche();
            //f.ShowDialog();
		}

		private void menuItem5_Click_1(object sender, System.EventArgs e)
		{
            frmChucDanh f = new frmChucDanh();
            f.ShowDialog();
		}	

		private void menuItem8_Click(object sender, System.EventArgs e)
		{
            //Tinhhinhnhanluc_theochucdanh f=new Tinhhinhnhanluc_theochucdanh();
            //f.ShowDialog();
		}

		private void menuItem16_Click_1(object sender, System.EventArgs e)
		{
			
		}

		private void menuItem42_Click(object sender, System.EventArgs e)
		{
            frmThongso f = new frmThongso();
            f.ShowDialog(this);
		}

		private void menuItem45_Click(object sender, System.EventArgs e)
		{
            //frmInthe f = new frmInthe();
            //f.ShowDialog();
		}

        private void frmMain_Load(object sender, EventArgs e)
        {
            
            
            //System.Threading.Thread.Sleep(1000);
            //Splasher.Close();
            frmload fl = new frmload();
            fl.Show();
            Application.DoEvents();
            
            if (Screen.PrimaryScreen.WorkingArea.Width >= 1000)//
            {
                this.BackgroundImage = lbl1024.Image;
            }
            else
            {
                this.BackgroundImage = lbl800.Image;
            }
            mDB.setStandar();
            ds = mDB.get_data("select * from " + mDB.user + ".pwhuman ");
            fl.Close();
            fl.Dispose();
            frmLogin f = new frmLogin();
            f.ShowDialog();
            if (f.ten_nd != "")
            {
                ten1 = f.ten_nd;
                ma = f.c_d;
                s_maquyen = f.maquyen;
                sten1 = f.sten;
                gan_right();
            }
            else
                Application.Exit();
            
        }
        private void setListBar()
        {
            ListBar.ImageList = ilsIcons32;
            ListBar.ToolTip = m_toolTip;
            ButtonListBarItem[] items = new ButtonListBarItem[9]
            {
                new ButtonListBarItem(
					"&Lý lịch", 0),
					new ButtonListBarItem(
					"Công tác", 1, "Quá trình công tác"),
                    new ButtonListBarItem(
					"Đào tạo", 5, "Quá trình đào tạo"),
   					new ButtonListBarItem( 
					"&Hợp đồng", 2, ""),
					new ButtonListBarItem( 
					"Gia cảnh", 3, ""),
					new ButtonListBarItem( 
					"Nước ngoài", 4, ""),
                    new ButtonListBarItem( 
					"Cấp sổ", 6, ""),
                    new ButtonListBarItem( 
					"Sức khỏe", 7, ""),
                    new ButtonListBarItem( 
					"Đoàn thể", 8, "")

            };
            ListBar.Items.Add(items);
            ListBar.Items[0].Selected = true;
 
        }
        private void gan_right()
        {
            int n = 0;
            for (int i = 0; i < this.mnuMain.MenuItems.Count - 3; i++)
            {
                for (int j = 0; j < this.mnuMain.MenuItems[i].MenuItems.Count; j++)
                {
                    if (this.mnuMain.MenuItems[i].MenuItems[j].MenuItems.Count == 0)
                    {
                        if (this.mnuMain.MenuItems[i].MenuItems[j].Text != "-") 
                            this.mnuMain.MenuItems[i].MenuItems[j].Enabled = s_maquyen.IndexOf(this.mnuMain.MenuItems[i].MenuItems[j].MergeOrder.ToString().PadLeft(3, '0') + "+") != -1;
                        else 
                            this.mnuMain.MenuItems[i].MenuItems[j].Enabled = true;
                    }
                    else
                    {
                        n = 0;
                        for (int k = 0; k < this.mnuMain.MenuItems[i].MenuItems[j].MenuItems.Count; k++)
                        {
                            if (this.mnuMain.MenuItems[i].MenuItems[j].MenuItems[k].Text != "-")
                                this.mnuMain.MenuItems[i].MenuItems[j].MenuItems[k].Enabled = s_maquyen.IndexOf(this.mnuMain.MenuItems[i].MenuItems[j].MenuItems[k].MergeOrder.ToString().PadLeft(3, '0') + "+") != -1;
                            else 
                                this.mnuMain.MenuItems[i].MenuItems[j].MenuItems[k].Enabled = true;
                            n += (this.mnuMain.MenuItems[i].MenuItems[j].MenuItems[k].Visible) ? 1 : 0;
                        }
                        this.mnuMain.MenuItems[i].MenuItems[j].Visible = n != 0;
                    }
                }
            }
            mnuSuaChuaSoLieu.Enabled = true;
            if (ten1 == AccessData.hrs_userid + "1920")
            {
                mnuQuanLyMK.Enabled = true;
                mnuSuaChuaSoLieu.Enabled = true;
            }
        }           
           

        private void menuItem23_Click_1(object sender, EventArgs e)
        {

        }

        private void menuItem46_Click(object sender, EventArgs e)
        {
            frmAbout frm = new frmAbout();
            frm.ShowDialog(this);
            frm.Dispose();
        }

        private void menuItem_tinh_Click(object sender, EventArgs e)
        {
            frmBtdtt f = new frmBtdtt(mDB,1);
            f.ShowDialog(this);

        }

        private void menuItem_quan_Click(object sender, EventArgs e)
        {
            frmBtdquan f = new frmBtdquan(mDB);
            f.ShowDialog();
        }

        private void menuItem_xa_Click(object sender, EventArgs e)
        {
            frmBtdpxa f = new frmBtdpxa(mDB,1);
            f.ShowDialog();
        }

        private void menuItem_cc_Click(object sender, EventArgs e)
        {
            string m_bp="",s_mmyy="",s_ngaylv="";
            int m_thang = 0, m_nam = 0;
            frmChonngay f = new frmChonngay();
            f.ShowDialog();
            s_mmyy = f.s_mmyy;
            s_ngaylv = f.s_ngaylv;
            m_bp = f.m_bp;
            m_thang = f.p_thang;
            m_nam = f.p_nam;
            if (s_mmyy != "" && m_bp != "")
            {
                frmChamcong f1 = new frmChamcong(s_mmyy, s_ngaylv, m_bp,m_thang,m_nam);
                f1.MdiParent = this;
                f1.Show();
            }
        }

        private void menuItem17_Click_1(object sender, EventArgs e)
        {
            frmChuyenData f = new frmChuyenData();
            f.Show();
        }

        private void menuItem14_Click_1(object sender, EventArgs e)
        {
            Baocao_ngayphep f = new Baocao_ngayphep();
            f.ShowDialog();
        }
	}
}
